local skill = fk.CreateSkill{
    name = "lingling__roushenshuijiao",
}
Fk:loadTranslationTable{
    ["lingling__roushenshuijiao"] = "肉神睡觉",
    [":lingling__roushenshuijiao"] = "回合结束时，你可以摸四张牌并翻面。当你受到伤害后，你可以翻至正面。",

    ["#lingling__roushenshuijiao1"] = "肉神睡觉：你可以摸四张牌并翻面",
    ["#lingling__roushenshuijiao2"] = "肉神睡觉：你可以翻至正面",
}
skill:addEffect(fk.TurnEnd, {
    anim_type = "defensive",
    can_trigger = function(self, event, target, player, data)
        return target == player and player:hasSkill(skill.name)
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        player:drawCards(4, skill.name)
        player:turnOver()
    end,
})
skill:addEffect(fk.Damaged, {
    anim_type = "masochism",
    can_trigger = function(self, event, target, player, data)
        return target == player and player:hasSkill(skill.name) and not player.faceup
    end,
    on_cost = function (self, event, target, player, data)
        return player.room:askToSkillInvoke(player, {
            skill_name = skill.name,
            prompt = "#lingling__roushenshuijiao2",
        })
    end,
    on_use = function (self, event, target, player, data)
        player:turnOver()
    end,
})
return skill